
public class TestString03 {
	public static void main(String[] args) {
		String str = "adsfsdAAf";
		//转换为大写
		System.out.println(str.toUpperCase());
		//转换为小写
		System.out.println(str.toLowerCase());
		String str1 = "Java";
		//忽略大小写的比较
		System.out.println(str1.equalsIgnoreCase("java"));
		System.out.println(str1.equals("java"));
		
		String str3 = "aaa.java";
		//用来判断文件类型
		System.out.println(str3.endsWith(".txt"));
		System.out.println(str3.substring(str3.lastIndexOf(".")+1));
		//是否以某个字符串开头
		System.out.println(str3.startsWith("aaa"));
		
		String str4 = "aa,dd,gg,dd,ee,ff";
		//利用某个字符串将原字符串进行分割，分割之后存储到数组中
		String[] ss = str4.split(",");
		for(String ts:ss) {
			System.out.println(ts);
		}
	}
}
